package org.yxing.palpalgps.utils;

import java.io.File;

import org.yxing.palpalgps.domain.UserInfo;

public class ConfigHelper {
    public static UserInfo nowUser;
    
    public static final String PORTRAIT = "/PalPalGPS/portrait";
    
    public static App app;
    
    public static UserInfo getNowUser() {
    	if (nowUser == null)
    		nowUser = new UserInfo();
    	
    	return nowUser;
    }
    
    public static final File getPortraitPath() {
        File path = null;
        if (Utils.hasSDCard()) {
            File sdCardPath = Utils.getSDCardPath();
            path = new File(sdCardPath + PORTRAIT);
            if (!path.exists())
                path.mkdirs();
        }
        
        return path;
    }
}
